package com.ldgk.pim.client.rpc;

import java.util.List;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.ldgk.pim.data.Place;

@RemoteServiceRelativePath("place")
public interface PlacesService extends RemoteService {
	
	/**
	 * Persists a place (create/update)
	 * @param place - Place to be persisted
	 */
	public void persist(Place place);
	
	/**
	 * Delete a place
	 * @param place - Place to be deleted
	 */
	public void delete(Place place);
	
	/**
	 * Find all places inside a geo box
	 * @param startLat - nw latitude
	 * @param startLng - nw longitude
	 * @param endLat - se latitude
	 * @param endLng - se longitude
	 * @return - List of Places found inside this geobox
	 */
	List<Place> findInsideBox(double startLat, double startLng, double endLat, double endLng);
}
